﻿@using Smartstore.Core.Catalog.Pricing

@model CatalogSettingsModel

<div class="adminContent">
    <div class="adminRow">
        <div class="admin-config-group">
            <div class="head">@T("Admin.Configuration.Settings.Price.Display")</div>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.PriceDisplayType" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.PriceDisplayType">
                <select asp-for="PriceSettings.PriceDisplayType" asp-items="Html.GetLocalizedEnumSelectList(typeof(PriceDisplayType))"></select>
            </setting-editor>
            <span asp-validation-for="PriceSettings.PriceDisplayType"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowVariantCombinationPriceAdjustment" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowVariantCombinationPriceAdjustment"></setting-editor>
            <span asp-validation-for="PriceSettings.ShowVariantCombinationPriceAdjustment"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowLoginForPriceNote" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowLoginForPriceNote"></setting-editor>
            <span asp-validation-for="PriceSettings.ShowLoginForPriceNote"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.DisplayTextForZeroPrices" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.DisplayTextForZeroPrices"></setting-editor>
            <span asp-validation-for="PriceSettings.DisplayTextForZeroPrices"></span>
        </div>
    </div>

    <div class="adminRow">
        <div class="admin-config-group">
            <div class="head">@T("Admin.Configuration.Settings.Price.Baseprice")</div>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowBasePriceInProductLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowBasePriceInProductLists"></setting-editor>
            <span asp-validation-for="PriceSettings.ShowBasePriceInProductLists"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.BundleItemShowBasePrice" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.BundleItemShowBasePrice"></setting-editor>
            <span asp-validation-for="PriceSettings.BundleItemShowBasePrice"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="admin-config-group">
            <div class="head">@T("Admin.Configuration.Settings.Price.Discounts")</div>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.IgnoreDiscounts" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.IgnoreDiscounts">
                @*INFO: toggler does not work on initial page load if applied on setting-editor tag.*@
                <input asp-for="PriceSettings.IgnoreDiscounts" data-toggler-for=".pricing-discounts" data-toggler-reverse="true" />
            </setting-editor>
            <span asp-validation-for="PriceSettings.IgnoreDiscounts"></span>
        </div>
    </div>
    <div class="adminRow pricing-discounts">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ValidateDiscountLimitationsInLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ValidateDiscountLimitationsInLists"></setting-editor>
            <span asp-validation-for="PriceSettings.ValidateDiscountLimitationsInLists"></span>
        </div>
    </div>
    <div class="adminRow pricing-discounts">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ValidateDiscountRulesInLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ValidateDiscountRulesInLists"></setting-editor>
            <span asp-validation-for="PriceSettings.ValidateDiscountRulesInLists"></span>
        </div>
    </div>
    <div class="adminRow pricing-discounts">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ValidateDiscountGiftCardsInLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ValidateDiscountGiftCardsInLists"></setting-editor>
            <span asp-validation-for="PriceSettings.ValidateDiscountGiftCardsInLists"></span>
        </div>
    </div>
    <div class="adminRow pricing-discounts">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ApplyPercentageDiscountOnTierPrice" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ApplyPercentageDiscountOnTierPrice"></setting-editor>
            <span asp-validation-for="PriceSettings.ApplyPercentageDiscountOnTierPrice"></span>
        </div>
    </div>

    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ApplyTierPricePercentageToAttributePriceAdjustments" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ApplyTierPricePercentageToAttributePriceAdjustments"></setting-editor>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.OfferPriceReplacesRegularPrice" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.OfferPriceReplacesRegularPrice"></setting-editor>
            <span asp-validation-for="PriceSettings.OfferPriceReplacesRegularPrice"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="admin-config-group">
            <div class="head">@T("Admin.Configuration.Settings.Price.DiscountDisplay")</div>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowSavingBadgeInLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowSavingBadgeInLists"></setting-editor>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowRetailPriceSaving" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowRetailPriceSaving"></setting-editor>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.AlwaysDisplayRetailPrice" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.AlwaysDisplayRetailPrice"></setting-editor>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.DefaultComparePriceLabelId" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.DefaultComparePriceLabelId">
                <select asp-for="PriceSettings.DefaultComparePriceLabelId" asp-items="ViewBag.AvailableDefaultComparePriceLabels"></select>
            </setting-editor>
            <span asp-validation-for="PriceSettings.DefaultComparePriceLabelId"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.DefaultRegularPriceLabelId" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.DefaultRegularPriceLabelId">
                <select asp-for="PriceSettings.DefaultRegularPriceLabelId" asp-items="ViewBag.AvailableDefaultRegularPriceLabels"></select>
            </setting-editor>
            <span asp-validation-for="PriceSettings.DefaultRegularPriceLabelId"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowPriceLabelInLists" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowPriceLabelInLists" />
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowOfferCountdownRemainingHours" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowOfferCountdownRemainingHours" sm-postfix="@T("Time.Hours")"></setting-editor>
            <span asp-validation-for="PriceSettings.ShowOfferCountdownRemainingHours"></span>
        </div>
    </div>
    <div class="adminRow">
        <div class="adminTitle">
            <smart-label asp-for="PriceSettings.ShowOfferBadge" />
        </div>
        <div class="adminData">
            <setting-editor asp-for="PriceSettings.ShowOfferBadge" data-toggler-for=".pnlPriceBadges"></setting-editor>
        </div>
    </div>
</div>
<div class="pnlPriceBadges">
    @(Html.LocalizedEditor<CatalogSettingsModel, PriceSettingsLocalizedModel>("setting-price-localized",
        @<div class="adminContent">
            <div class="adminRow">
                <div class="adminTitle">
                    <smart-label asp-for="Locales[item].OfferBadgeLabel" />
                </div>
                <div class="adminData">
                    @*IMPORTANT: Do not delete, this hidden element contains the id to assign localized values to the corresponding language *@
                    <input type="hidden" asp-for="Locales[item].LanguageId" />

                    <setting-editor asp-for="Locales[item].OfferBadgeLabel"></setting-editor>
                    <span asp-validation-for="Locales[item].OfferBadgeLabel"></span>
                </div>
            </div>
            <div class="adminRow">
                <div class="adminTitle">
                    <smart-label asp-for="Locales[item].LimitedOfferBadgeLabel" />
                </div>
                <div class="adminData">
                    <setting-editor asp-for="Locales[item].LimitedOfferBadgeLabel"></setting-editor>
                    <span asp-validation-for="Locales[item].LimitedOfferBadgeLabel"></span>
                </div>
            </div>
        </div>
        ,
        @<div class="adminContent">
            <div class="adminRow">
                <div class="adminTitle">
                    <smart-label asp-for="PriceSettings.OfferBadgeLabel" />
                </div>
                <div class="adminData">
                    <setting-editor asp-for="PriceSettings.OfferBadgeLabel"></setting-editor>
                    <span asp-validation-for="PriceSettings.OfferBadgeLabel"></span>
                </div>
            </div>
            <div class="adminRow">
                <div class="adminTitle">
                    <smart-label asp-for="PriceSettings.LimitedOfferBadgeLabel" />
                </div>
                <div class="adminData">
                    <setting-editor asp-for="PriceSettings.LimitedOfferBadgeLabel"></setting-editor>
                    <span asp-validation-for="PriceSettings.LimitedOfferBadgeLabel"></span>
                </div>
            </div>
        </div>
    ))
    <div class="adminContent">
        <div class="adminRow">
            <div class="adminTitle">
                <smart-label asp-for="PriceSettings.OfferBadgeStyle" />
            </div>
            <div class="adminData">
                <setting-editor asp-for="PriceSettings.OfferBadgeStyle">
                    <select asp-for="PriceSettings.OfferBadgeStyle" asp-items="ViewBag.OfferBadgeStyles"></select>
                </setting-editor>
                <span asp-validation-for="PriceSettings.OfferBadgeStyle"></span>
            </div>
        </div>
        <div class="adminRow">
            <div class="adminTitle">
                <smart-label asp-for="PriceSettings.LimitedOfferBadgeStyle" />
            </div>
            <div class="adminData">
                <setting-editor asp-for="PriceSettings.LimitedOfferBadgeStyle">
                    <select asp-for="PriceSettings.LimitedOfferBadgeStyle" asp-items="ViewBag.LimitedOfferBadgeStyles"></select>
                </setting-editor>
                <span asp-validation-for="PriceSettings.LimitedOfferBadgeStyle"></span>
            </div>
        </div>
        <div class="adminRow">
            <div class="adminTitle">
                <smart-label asp-for="PriceSettings.ShowOfferBadgeInLists" />
            </div>
            <div class="adminData">
                <setting-editor asp-for="PriceSettings.ShowOfferBadgeInLists" />
                <span asp-validation-for="PriceSettings.ShowOfferBadgeInLists"></span>
            </div>
        </div>
    </div>
</div>